#ifndef __MARS_GRAPHICS_RENDER_OBJECT_H__
#define __MARS_GRAPHICS_RENDER_OBJECT_H__

#include "MarsObject.h"

using namespace Core;

namespace GObject
{
class Renderable;
} // end of namespace GObject

namespace Graphics
{


class RenderObject : public Object
{
public:
									RenderObject();
									~RenderObject();

	void							SetWorldMatrix( const XMMATRIX& matrix );
	const XMMATRIX&					GetWorldMatrix() const;

	void							SetRenderable( GObject::Renderable* pRenderable );
	GObject::Renderable*			GetRenderable() const;

private:
	XMMATRIX						m_worldTransformation;
	GObject::Renderable*			m_pRenderable;
};

typedef std::vector<RenderObject*> RenderObjectArray;

inline RenderObject::RenderObject()
	: m_pRenderable( NULL )
{
	m_worldTransformation = XMMatrixIdentity();
}

inline RenderObject::~RenderObject()
{

}

inline void RenderObject::SetWorldMatrix( const XMMATRIX& matrix )
{
	m_worldTransformation = matrix;
}

inline const XMMATRIX&	RenderObject::GetWorldMatrix() const
{
	return m_worldTransformation;
}

inline void RenderObject::SetRenderable( GObject::Renderable* pRenderable )
{
	m_pRenderable = pRenderable;
}

inline GObject::Renderable* RenderObject::GetRenderable() const
{
	return m_pRenderable;
}

} // end of namespace Graphics

#endif // end of #ifndef __MARS_GRAPHICS_RENDER_OBJECT_H__